import request from '@/utils/request'

const url = 'http://192.168.10.100:9881/rabc'

export function getAllResourceAndAllOptions() {
  return request({
    url: url + '/authorize/getAllResourceAndAllOptions',
    method: 'post'
  })
}

export function getAllUserByRoleId(query) {
  return request({
    url: url + '/user/getAllByRoleId',
    method: 'post',
    params: query
  })
}

// /authorize/getPermissionIdsByRoleId
export function getPermissionIdsByRoleId(query) {
  return request({
    url: url + '/authorize/getPermissionIdsByRoleId',
    method: 'post',
    params: query
  })
}

export function changeRolePermission(query) {
  return request({
    url: url + '/authorize/changeRolesPermission',
    method: 'post',
    params: query
  })
}

export function authorizeUserRole(query) {
  return request({
    url: url + '/authorize/authorizeRoleToUser',
    method: 'post',
    params: query
  })
}

